package behavior.memento;

public class BackupData {
	private Object data;

	public BackupData(Object data) {
		this.data = data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public Object getData() {
		return data;
	}

	public BackupMemento saveToMemento() {
		return new BackupMemento(data);
	}

	public void restoreFromMemento(BackupMemento memento) {
		data = memento.getData();
	}
}
